<%= form_for @actionPage,
  url: { controller: :action_pages,
         action: (@actionPage.new_record? ? :create : :update)},
  :html => { id: "action-page-form", multipart: true, :"data-timestamp" => @actionPage.updated_at.as_json }  do |f| -%>

  <% if can?(:administer_actions) %>
    <%= render partial: 'top_bar_authoring_controls', :locals => {:f => f} %>
  <% end %>

  <!-- tab_panels.html.erb -->
  <div class='container-fluid edit-action'>
    <div class="tabs-left">
      <%= render 'tab_buttons' %>

      <!-- Tab panes -->
      <div class="tab-content responsive">
        <% if can?(:administer_actions) %>
          <%= render partial: 'panel_content', :locals => {:f => f} %>
          <%= render partial: 'panel_settings', :locals => {:f => f} %>
          <%= render partial: 'panel_photos', :locals => {:f => f} %>
          <%= render partial: 'panel_social', :locals => {:f => f} %>
          <%= render partial: 'panel_email', :locals => {:f => f} %>
          <%= render partial: 'panel_victory', :locals => {:f => f} %>
        <% end %>

        <% if can?(:view_analytics) %>
          <%= render partial: 'panel_analytics', :locals => {:f => f} %>
        <% end %>
      </div><!-- .tab-content -->

    </div><!-- .tabs-left -->
  </div><!-- .container.edit-action -->

  <input id="anchor" type="hidden" name="anchor">
<% end -%>

<!-- Button trigger modal -->


<%= render 'modal_gallery.html.erb' %>
